<?php 	
	$categories= $_SESSION['sharing']->getRestrictedCategories();
	foreach ($categories as $category) {
		$_SESSION['sharing']->allowCategory($category['id']);
		
	}
	if (!empty($_POST['categories'])){
		foreach ($_POST['categories'] as $category)
		$_SESSION['sharing']->maskCategory($category);
		}
		
?>